package com.greatpengcode.service.impl;

import com.greatpengcode.dao.LoginDao;
import com.greatpengcode.pojo.User;
import com.greatpengcode.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private LoginDao loginDao;
    @Override
    public User getUserByName(String userName) {
        User user = loginDao.getUserByName(userName);
        return user;
    }

    public int addUser(User user){
        int result = loginDao.addUser(user);
        return result;
    }
}
